package com.project.controller;

import com.project.bean.GradeBean;
import com.project.service.IGradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Set;

/**
 * @Title: GradeController
 * @Package: com.project.controller
 * @Description:
 * @Author: Liang-Xie
 */
@SuppressWarnings("all")
@RestController
@RequestMapping("grade")
public class GradeController {
    @Autowired
    private IGradeService gradeService;

    /**
     * 查询所有权限
     */
    @RequestMapping("findAll")
    public Set<GradeBean> findAll() {
        return gradeService.findAll();
    }
    /**
     * 根据角色集合查询权限集合
     */
    @RequestMapping("findByRoleArray")
    public Set<GradeBean> findByRoleArray(Integer[] roleArray) {
        return gradeService.findByRoleArray(roleArray);
    }
}
